{tbdList}
<br />
{myChsbtn}

<script>
var _id = {lotto_id};
if (window.XMLHttpRequest)
{// code for all new browsers
    XH1 = new XMLHttpRequest();
}
else if (window.ActiveXObject)
{
  XH1 = new ActiveXObject("Microsoft.XMLHTTP");
} else 
  alert("Your browser does not support XMLHTTP.");
var myRate = 0.01;
function ratediff(btype ,subid ,num ,rate){    
  if(myRate != false){ rate = (rate < 0)?(0- myRate):myRate; }
  
  XH1.open("POST", "op.php?op=admin&fp=ratediff&id="+_id+"&bettype="+btype+"&number="+subid+"_"+num+"&rate="+rate+"&pagename=0&method=0",false); 
  try{XH1.send("");}catch(E){}
	setTimeout("location.href='op.php?op=admin&fp=ratePanel&lotto_id="+_id+"&bettype="+btype+"&subid="+subid+"&btnRate="+myRate+"'", 10);
}

$("#divMyChsbtn span").click(function(){
  myRate = $(this).text() - 0;
  $("#divMyChsbtn span.btnchoiced").attr("class", "btnchoice");
  $(this).attr("class", "btnchoiced");
});

$(function(){
  $("#divMyChsbtn span.btnchoiced").click();
});

</script>